package com.bh.Controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Wang
 * @version 1.0
 * {@code @date} 2022/6/8 14:13
 */
@RestController
@RequestMapping("/stock")
public class StockController {

    @GetMapping("/update")
    public String update(){
        System.out.println("----------库存更新-----");
        return "库存更新";
    }

    @GetMapping("/query")
    public Map query(){
        Map map=new HashMap();
        map.put("name","手机");
        map.put("stock",1999);
        return map;
    }
}
